<%@ tag body-content="empty"%>
<%@ attribute name="spittle" required="true"
	type="org.spitter.core.model.Spittle"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="t" uri="http://tiles.apache.org/tags-tiles"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>


<s:url value="/spitters/spittles?spitter={spitterName}"
	var="spitter_url">
	<s:param name="spitterName" value="{spittle.spitter.username}" />
</s:url>

<div>
	<s:url value="/spitters/{spitterName}" var="spitter_url">
		<s:param name="spitterName" value="${spittle.spitter.username}" />
	</s:url>

	<span class="spittleListImage"> 
	<img
			src="<s:url value="/resources/images/avatars/${spittle.spitter.id}.jpg"/>" width="48"
			border="0" align="middle"
			onError="this.src='<s:url value="/resources/images/avatars"/>/default.jpg';" />
	</span> <span class="spittleListText"> <a href="${spitter_url}"> <c:out
					value="${spittle.spitter.username}" />
		</a> - <c:out value="${spittle.text}" /><br /> <small><fmt:formatDate
					value="${spittle.when}" pattern="hh:mma d MMM, yyyy" /></small>
	</span>
</div>